<?php

namespace app\mobile\controller;

use think\Controller;
use think\Session;
use app\admin\model\Banner as BannerModel;
use app\admin\model\Product as ProductModel;
use app\admin\model\News as NewsModel;
use app\admin\model\Trust as TrustModel;
class Index extends Base
{

    public function index()
    {

        $banners = BannerModel::where('category_id', 20)->where('languagedata', 1)->select();
        $product = ProductModel::order('id', 'desc')->paginate(9);
        $news = NewsModel::order('id', 'desc')->paginate(5);
        $trust = TrustModel::order('id', 'desc')->paginate(3);
        $this->assign([
            'banners' => $banners,
            'product' => $product,
            'news' => $news,
            'trust' => $trust,
        ]);
        return $this->fetch();
    }
}